home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / doodle_d.swf / scripts / frame_4 / DoAction_11.as < prev    next >
Text File  |  2013-04-24  |  876b  |  47 lines

  1. function death()
  2. {
  3.    trace("WTF!");
  4.    depth = _root.getNextHighestDepth();
  5.    _root.attachMovie("exp","exp" + depth,depth);
  6.    exp = eval("_root.exp" + depth);
  7.    exp._x = ship._x;
  8.    exp._y = ship._y;
  9.    ship._x = -500;
  10.    ship._y = -500;
  11.    _root._y = 0;
  12.    if(lives > 1)
  13.    {
  14.       life = false;
  15.       dead = true;
  16.       _root._y = 0;
  17.       lives--;
  18.       i = 0;
  19.       i = 0;
  20.       while(i < 21)
  21.       {
  22.          ene = eval("e" + i);
  23.          ene.removeMovieClip();
  24.          i++;
  25.       }
  26.       eAmount = 0;
  27.       gotoAndStop("tryAgain");
  28.    }
  29.    else
  30.    {
  31.       life = false;
  32.       dead = true;
  33.       _root._y = 0;
  34.       lives--;
  35.       i = 0;
  36.       i = 0;
  37.       while(i < 21)
  38.       {
  39.          ene = eval("e" + i);
  40.          ene.removeMovieClip();
  41.          i++;
  42.       }
  43.       eAmount = 0;
  44.       gotoAndStop("gameOver");
  45.    }
  46. }
  47.